
* Open log
capture log close

***************************************************************
* Run do-files to reproduce all results reported in the article
***************************************************************

* Programme:	cbld-master.do
* Project:		Council coalition building
* Author:		Frank Haege, Department of Politics and Administration, University of Limerick
* Contact:		frank.haege@ul.ie

* Description
*************
* This master do-file runs all do-files used to process, describe,
* and analyse the data that underly the results reported in the article
* The only exception are the nonlinear quantile regression results,
* which were produced separately in R (see 'cbld-analysis02-fig05.r')


* Set up Stata
**************
version 11
clear all
macro drop _all
set more off


* Data processing
*****************

* Process the data from the computational experiments
do "Data analysis\cbld-management01.do"

* Generate data of consensus rates expected by chance
do "Data analysis\cbld-management02.do"

* Process the data from experiments with a single voting threshold and without weighted votes
do "Data analysis\cbld-management03-exp02.do"

* Process the data from experiments with several voting thresholds and weighted votes
do "Data analysis\cbld-management04-exp03.do"

* Generate data of consensus rates predicted by computational model
do "Data analysis\cbld-management05.do"


* Problem description, case study, and model illustration
*********************************************************

* Fig. 1. Consensus decision making in the Council of the European Union, 1994�2006
do "Data analysis\cbld-description01-fig01.do"

* Fig. 2. Real-world coalition-building dynamics in the Council of the European Union
do "Data analysis\cbld-description02-fig02.do"

* Fig. 3. Coalition-building dynamics: A typical model run
do "Data analysis\cbld-description03-fig03.do"


* Empirical and theoretical analysis
************************************

* Fig. 4. Observed versus predicted consensus rates
do "Data analysis\cbld-analysis01-fig04.do"

* Appendix: Additional results for 'An Empirical evaluation of aggregate model output'
do "Data analysis\cbld-analysis01-app.do"

* Fig. 5. Effect of voting threshold on winning coalition size by membership size
do "Data analysis\cbld-analysis02-fig05.do"

* Appendix: Additional results for 'The predicted effects of voting threshold and membership size'
do "Data analysis\cbld-analysis02-app.do"


* Exit do-file
exit


